Motor control apparatus capable of protecting process face at the time of occurrence of abnormal load

ABSTRACT

A motor control apparatus controlling a motor driving a machine tool includes, an abnormal load detecting unit that detects an abnormal load by monitoring a load of the motor, a retract amount storing unit that stores a plurality of retract amounts used when the machine tool performs a retract operation in response to detection of an abnormal load by the abnormal load detecting unit, a retract amount switching unit that switches a retract amount selected from the plurality of retract amounts in accordance with a result of determination of whether the machine tool is processing or not, and a retract amount adding unit that adds a retract amount selected by switching of the retract amount switching unit to an instruction value indicative of a movement amount of the machine tool.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a motor control apparatus capable ofprotecting a process face at the time of occurrence of an abnormal load.

2. Description of the Related Art

A machine tool includes motors along with drive axes, and the motors aredriven and controlled by a motor control apparatus. For example, a motoris used for rotation of a tool or a workpiece and controlling contourtrajectory. The motor control apparatus instructs and controls motorspeed, torque, or the position of a rotor for the number of motorscorresponding to the number of drive axes of a machine tool, the motordriving the drive axes.

FIGS. 12A to 12D are diagrams illustrating a process flow of a machinetool which cuts a workpiece. FIG. 12A is a diagram illustrating a statewhere a workpiece is disposed. FIG. 12B is a diagram illustrating astate where a cutter of the machine tool is moved from a housingposition to a position close to the workpiece prior to processing. FIG.12C is a diagram illustrating a state of processing of cutting theworkpiece by the machine tool. FIG. 12D is a diagram illustrating astate where the cutter of the machine tool is moved from the positionclose to the workpiece to the housing position after the processing.

When a cutter 901 of a machine tool 900 moves from the state illustratedin FIG. 12A to the state illustrated in FIG. 12B or from the stateillustrated in FIG. 12C to the state illustrated in FIG. 12D, a motorfor moving the cutter 901 is controlled to move the cutter 901 atrelatively high speed. On the other hand, in the state illustrated inFIG. 12C, to gradually move the cutter 901 while rotating a workpiece910, the motor moving the cutter 901 is controlled to move the cutter901 at a relatively low speed.

When the movement of the cutter 901 is disturbed by collision of thecutter 901 of the machine tool 900 with another object or a failureoccurs in a transmission mechanism during processing or non-processingof the workpiece 910, an excessive load is applied to the motor, whichmay result in the motor failing or a driven body may break.

To solve the problem, Japanese Laid-open Patent Publication No.2007-219991 describes an abnormal load detecting apparatus for detectingan abnormal load applied on a motor for driving a driven body. Theabnormal load detecting apparatus described in Japanese Laid-open PatentPublication No. 2007-219991 includes disturbance torque estimatingmeans, speed comparing means, and torque comparing means. Thedisturbance torque estimating means estimates a disturbance toqueapplied to a motor, the speed comparing means compares the rotationalspeed of a motor with a predetermined reference speed, and the torquecomparing means compares the disturbance torque estimated by thedisturbance torque estimating means with a predetermined referencetorque. In the abnormal load detecting apparatus described in JapaneseLaid-open Patent Publication No. 2007-219991, when it is determined thatthe rotational speed of the motor exceeds the reference speed in thespeed comparing means and it is determined that the disturbance torqueis lower than the reference torque in the torque comparing means,occurrence of abnormality is determined.

Japanese Examined Patent Application Publication No. H07-25006 describesa tool retracting method of detecting the magnitude of a cutting load ineach of process-axes directions, obtaining a cutting load directionapplied to a workpiece by the ratio of process-axes directionscomponents in the detected magnitudes of the cutting loads, andobtaining a tool retract relative position on the basis of the cuttingload direction. In the tool retracting method described in JapaneseExamined Patent Application Publication No. H07-25006, a tool retractinstruction is generated on an opposite-direction vector to the obtainedtool retract relative position, and a tool is automatically retracted inaccordance with the generated tool retract instruction.

Japanese Patent Publication No. 5,168,352 describes a collisiondetecting apparatus provided with a drive motor, load current detectingmeans which detects load current in the drive motor, error detectingmeans which detects an error in the drive motor, and control means whichcontrols driving of the drive motor. In the collision detectingapparatus described in Japanese Patent Publication No. 5,168,352, thecontrol means determines whether a driving apparatus for the drive motoris processing or not. Subsequently, on the basis of the determinationresult, the control means sets a load current setting value indicating areference current value for determining a collision between a structureprovided with the drive motor and an object to be processed and a motorcurrent limit value for limiting the motor current so that a motoroutput torque of the drive motor becomes equal to or less than apredetermined value. During processing, the control means limits theload current detected by the load current detecting means becomes equalto or less than the motor current limit value set to be equal to orlarger than the load current setting value and detects a collision whenthe load current becomes equal to or larger than the load currentsetting value. During non-processing, when the load current detected bythe load current detecting means becomes equal to or larger than themotor current limit value which is set to be equal to or less than theload current setting value, the control means determines an errordetected by the error detecting means, thereby detecting a collision.

However, since the speed of moving the cutter 901 during processing theworkpiece 910 and the speed of moving the cutter 901 duringnon-processing are different from each other, there is a problem thatthe flow amount that the cutter 901 moves varies since the machine tool900 detects a collision until a retract operation is started.

FIG. 13 is a diagram illustrating the relation between the flow amountof movement of the cutter 901 since the machine tool 900 detects acollision until a retract operation is started and the retract amount ofretract of the cutter 901 by the retract operation. In FIG. 13, thehorizontal axis indicates time, and the vertical axis indicates aposition change in the movement direction. In FIG. 13, the solid lineindicates movement of the cutter 901 when a collision is detected duringprocessing and the broken line indicates movement of the cutter 901 whena collision is detected during non-processing. “A” denotes a positionwhere a collision is detected during processing, “B” denotes a positionwhere the retract operation is started when a collision is detectedduring processing, and “C” indicates a position of retract when acollision is detected during processing. A′ denotes a position where acollision is detected during non-processing, B′ denotes a position wherethe retract operation is started when a collision is detected duringnon-processing, and C′ indicates a position of retract when a collisionis detected during non-processing.

A flow amount X[m] is expressed by the following Equation (1) frommovement speed F[m/s] of the cutter 901 and delay time T[s] since acollision is detected until a retract operation is started.

X=F×T  Equation (1)

For example, when the movement speed of the cutter 901 is 1000 [mm/s]and the delay time is 1[ms], the flow amount X becomes 1 mm. The largerthe flow amount is, the more the cutter 901 proceeds toward thecollision direction, and there is the possibility that breakage of themachine tool 900 becomes severe.

In the machine tool 900, the flow amount during non-processing becomeslarger than the flow amount during processing. However, in the machinetool 900, the same retract amount is used during processing and duringnon-processing even though the flow amount varies.

Consequently, when a collision is detected during non-processing inwhich the flow amount is relatively large, there is the possibility thatthe retract amount is insufficient and the machine tool 900 may break.On the other hand, when a sufficiently large retract amount is assuredto protect the machine tool 900, a situation where the cutter may not beretracted may occur during processing.

FIG. 14 is a diagram illustrating an example that retract is not easyduring processing of a workpiece.

A machine tool 920 includes a cutter supporting unit 921 and a cutter922 disposed on the top face of the cutter supporting unit 921 in orderto cut the upper wall of a recess in a workpiece 930. The machine tool920 makes the cutter 922 come close to the inner wall of the recess inthe workpiece 930 and gradually moves the cutter supporting unit 921upward to cut the inner wall of the recess in the workpiece 930.

In the machine tool 920, the difference between the width of the recessin the workpiece 930 and the height of the cutter supporting unit 921 isa distance which can be assured as a retract amount. In the machine tool920, when the retract amount is larger than the difference between thewidth of the recess in the workpiece 930 and the height of the cuttersupporting unit 921, there is the possibility that the workpiece 930 orthe machine tool 920 may break.

In the Japanese Laid-open Patent Publication No. 2007-219991, although amethod of detecting an abnormal load is presented, a measure forpreventing a process face from being damaged when an abnormal load isdetected is not described. In Japanese Examined Patent ApplicationPublication No. H07-25006, although a method of detecting an abnormalload and a retract method when a cutting failure occurs are described, ameasure against the case that retract may not be performed when acutting failure occurs is not described. In Japanese Patent Publication5,168,352, although it is described that whether a driving apparatus fora motor is processing or not is determined, and on the basis of a resultof the determination, a collision is detected, retract when a collisionis detected is not described.

SUMMARY OF THE INVENTION

In view of the above-described problems, an object of the presentinvention is to provide a motor control apparatus capable of protectingdifferent protection objects such as protection of a machine duringnon-processing and protection of a workpiece during processing.

To achieve the object, a motor control apparatus controlling a motordriving a machine tool includes, an abnormal load detecting unit thatdetects an abnormal load by monitoring a load of the motor, a retractamount storing unit that stores a plurality of retract amounts used whenthe machine tool performs a retract operation in response to detectionof an abnormal load by the abnormal load detecting unit, a retractamount switching unit that switches a retract amount selected from theplurality of retract amounts in accordance with a result ofdetermination of whether the machine tool is processing or not, and aretract amount adding unit that adds a retract amount selected byswitching of the retract amount switching unit to an instruction valueindicative of a movement amount of the machine tool, and a retractamount selected when it is determined that processing is being made anda retract amount selected when it is determined that processing is notbeing made are switched.

In the above-described mode, the retract amount switching unit mayswitch a retract amount to be selected in accordance with a mode signalinput from a host controller.

In the above-described mode, the retract amount switching unit mayswitch a retract amount to be selected in accordance with a switchsignal input from an external device.

In the above-described mode, a retract amount to be selected when it isdetermined that the machine tool is processing may be rewritten inaccordance with a process program used.

In the above-described mode, a retract amount selected when it isdetermined that the machine tool is processing may be rewritten inaccordance with a process state of a workpiece which is processed by themachine tool.

BRIEF DESCRIPTION OF DRAWINGS

The present invention will be understood more clearly with reference tothe following appended drawings, in which:

FIG. 1 is a block diagram illustrating a motor control system accordingto a first embodiment;

FIG. 2 is a flowchart illustrating a process flow of the motor controlsystem illustrated in FIG. 1;

FIG. 3 is a block diagram illustrating a motor control system accordingto a second embodiment;

FIG. 4 is a block diagram illustrating a motor control system accordingto a third embodiment;

FIG. 5 is a flowchart illustrating a process flow of the motor controlsystem illustrated in FIG. 4;

FIG. 6A is a diagram illustrating an example of a process of a machinetool to which the motor control system illustrated in FIG. 4 is applied;

FIG. 6B is a diagram illustrating another example of the process of themachine tool to which the motor control system illustrated in FIG. 4 isapplied;

FIG. 7 is a block diagram illustrating a motor control system accordingto a fourth embodiment;

FIG. 8 is a flowchart illustrating a process flow of the motor controlsystem illustrated in FIG. 7;

FIG. 9 is a diagram illustrating an example of a process of a machinetool to which the motor control system illustrated in FIG. 7 is applied;

FIG. 10 is a block diagram illustrating a motor control system accordingto a fifth embodiment;

FIG. 11 is a flowchart illustrating a process flow of the motor controlsystem illustrated in FIG. 10;

FIGS. 12A to 12D are diagrams illustrating a process flow of a machinetool which cuts a workpiece; FIG. 12A is a diagram illustrating a statewhere a workpiece is disposed, FIG. 12B is a diagram illustrating astate where a cutter of the machine tool is moved from a housingposition to a position close to the workpiece prior to processing, FIG.12C is a diagram illustrating a process state of cutting the workpieceby the machine tool, and FIG. 12D is a diagram illustrating a statewhere the cutter of the machine tool is moved from the position close tothe workpiece to the housing position after the processing;

FIG. 13 is a diagram illustrating the relation between the flow amountof movement of a cutter since the machine tool detects a collision untila retract operation is started and the retract amount of retract of thecutter by the retract operation; and

FIG. 14 is a diagram illustrating an example that retract is not easyduring a workpiece is being processed.

DETAILED DESCRIPTION

In the following, by referring to the drawings, a motor controlapparatus according to the present invention will be described withfirst to fifth embodiments. However, it is to be understood that thepresent invention is not limited to the drawings and embodimentsillustrated below.

FIG. 1 is a block diagram illustrating a motor control system includinga motor control apparatus according to a first embodiment. Hereinbelow,it is assumed that components to which the same reference numerals aredesignated in different drawings have the same function.

A motor control system 101 according to a first embodiment includes amotor control apparatus 1, a motor 30, and a first host controller 41.The motor control apparatus 1 includes a position deviation generatingunit 10, a position control unit 11, a speed control unit 12, a currentcontrol unit 13, an amplifier 14, a retract amount storing unit 20, aretract amount switching unit 21, an abnormal load detecting unit 22, aretract amount switch 23, and a retract amount adding unit 24.

A movement instruction output from the first host controller and aretract amount output from the retract amount storing unit 20 are addedby the retract amount adding unit 24 to generate a movement instruction.Further, a position deviation generated from the difference between themovement instruction and motor position information output from themotor 30 is output to the position control unit 11. The position controlunit 11 generates a speed instruction value on the basis of the positiondeviation and outputs the generated speed instruction value to the speedcontrol unit 12. The speed control unit 12 generates a currentinstruction value from the speed instruction value input from theposition control unit 11 and the motor speed information output from themotor 30 and outputs the generated current instruction value to thecurrent control unit 13. The current control unit 13 generates a driveinstruction for driving the amplifier 14 from the current instructionvalue input from the speed control unit 12 and the motor currentinformation output from the motor 30, and outputs the generated driveinstruction to the amplifier 14. The amplifier 14 is, for example, aninverter for converting DC power to AC power by switching operation of aswitching element provided on the inside. The amplifier 14 controls theswitching operation of the switching element in the amplifier 14 by areceived drive instruction to control a converting operation ofconverting the DC power to the AC power for driving the motor 30.

The retract amount storing unit 20 is a storing device capable ofstoring a plurality of retract amounts, and stores a first retractamount 201 and a second retract amount 202 whose value is different fromthe first retract amount 201. The first retract amount 201 is a retractamount used at the time of processing, and the second retract amount 202is a retract amount used at the time of non-processing.

The first retract amount 201 is an amount suitable to protect aworkpiece which is processed by a driver driven by the motor 30. Whenthe motor 30 drives a cutter supporting unit 921 which supports a cutter922 cutting the inner walls of recesses in a workpiece 930 illustratedin FIG. 14, the distance shorter than the difference between the widthof a recess in the workpiece 930 and the height of the cutter supportingunit 921 is the distance of the first retract amount 201.

The second retract amount 202 is an amount suitable to protect a machinetool including the motor 30 and a driver driven by the motor 30. Whenthe motor 30 drives a cutter 901 cutting the top face of a workpiece 910illustrated in FIGS. 12A to 12D, a distance of compensating a flowamount X[m] computed by Equation (1) from a movement speed F[m/s] whenthe cutter 901 moves and delay time T[s] is the first retract amount201.

To the retract amount switching unit 21, a mode signal indicatingwhether the drive unit driven by the motor 30 is processing or not issupplied from the first host controller 41. The retract amount switchingunit 21 selects either the first retract amount 201 or the secondretract amount 202 stored in the retract amount storing unit 20 on thebasis of the mode signal supplied from the first host controller 41.

The abnormal load detecting unit 22 monitors the load of the motor 30and detects an abnormal load. For example, when motor currentinformation output from the motor 30 is smaller than a predeterminedthreshold, the abnormal load detecting unit 22 determines that the loadof the motor 30 is normal. When the motor current information outputfrom the motor 30 is larger than the predetermined threshold, theabnormal load detecting unit 22 determines that the load of the motor 30is abnormal. When it is determined that the load of the motor 30 isabnormal, the abnormal load detecting unit 22 outputs motor loadabnormal information indicating that the load of the motor 30 isabnormal is output to the retract amount switch 23 and the first hostcontroller 41.

When the motor load abnormal information is not input from the abnormalload detecting unit 22, the retract amount switch 23 enters an off stateand outputs zero. When the motor load abnormal information is input fromthe abnormal load detecting unit 22, the retract amount switch 23 entersan on state and outputs either the first retract amount 201 or thesecond retract amount 202 selected by the retract amount switching unit21 to the retract amount adding unit 24.

The retract amount adding unit 24 is an adder adding the movementinstruction value supplied from the first host controller 41 and thevalue supplied from the retract amount switch 23. When the retractamount switch 23 is in the off state, the retract amount adding unit 24outputs the movement instruction value supplied from the first hostcontroller 41 as a movement instruction value to the position deviationgenerating unit 10. When the retract amount switch 23 is in the onstate, the retract amount adding unit 24 outputs a value obtained byadding the retract amount supplied from the retract amount switch 23 tothe movement instruction value supplied from the first host controller41 as a movement instruction value. When the retract amount switchingunit 21 selects the first retract amount 201 and the retract amountswitch 23 is in the on state, the retract amount adding unit 24 outputsthe value obtained by adding the first retract amount 201 to themovement instruction value supplied from the first host controller 41 asa movement instruction value to the position deviation generating unit10. When the retract amount switching unit 21 selects the second retractamount 202 and the retract amount switch 23 is in the on state, theretract amount adding unit 24 outputs the value obtained by adding thesecond retract amount 202 to the movement instruction value suppliedfrom the first host controller 41 as a movement instruction value to theposition deviation generating unit 10.

The motor 30 drives a driver of a not-illustrated machine tool inaccordance with AC power output from the amplifier 14. The motor 30includes a motor position detector detecting the position of the motor30, a motor speed detector detecting the speed of the motor 30, and amotor current detector detecting current of the motor 30. The motor 30outputs motor position information detected by the motor positiondetector to the position deviation generating unit 10, and outputs motorspeed information detected by the motor speed detector to the speedcontrol unit 12. The motor 30 outputs motor current information detectedby the motor current detector to the current control unit 13. Forposition feedback, a detector of a separate placement type may be used.

The first host controller 41 includes a movement instruction valuegenerating unit 410 and a driver state determining unit 411. Themovement instruction value generating unit 410 generates a movementinstruction value indicative of a movement amount of the position of thedriver driven by the motor 30, and outputs the generated movementinstruction value to the retract amount adding unit 24. The driver statedetermining unit 411 determines whether the driver driven by the motor30 is processing or not and outputs a mode signal indicative of adetermination result to the retract amount switching unit 21.

FIG. 2 is a flowchart illustrating a process flow of the motor controlsystem 101.

In step S101, the abnormal load detecting unit 22 compares, for example,motor current information output from the motor 30 with a predeterminedthreshold. When it is determined that the motor current informationoutput from the motor 30 is smaller than a predetermined threshold, theabnormal load detecting unit 22 determines that the load of the motor 30is normal and an abnormal load is not generated, and the process isfinished. When it is determined that the motor current informationoutput from the motor 30 is larger than the predetermined threshold, theabnormal load detecting unit 22 determines occurrence of loadabnormality in the motor 30, and outputs motor load abnormalityinformation to the retract amount switch 23 and the first hostcontroller 41. When the motor load abnormality information is supplied,the retract amount switch 23 enters an on state and connects the retractamount switching unit 21 and the retract amount adding unit 24.

Subsequently, in step S102, the first host controller 41 to which themotor load abnormal information is supplied determines whether thedriver driven by the motor 30 is processing or not and outputs a modesignal indicative of the determination result to the retract amountswitching unit 21. When a mode signal indicating that the driver drivenby the motor 30 is processing is received, the process proceeds to stepS103. When a mode signal indicating that the driver driven by the motor30 is not processing is received, the process proceeds to step S104.

When the process proceeds to step S103, the retract amount switchingunit 21 is switched to select the first retract amount 201. Since theretract amount switching unit 21 selects the first retract amount 201and the retract amount switch 23 is in the on state, the retract amountadding unit 24 outputs a value obtained by adding the first retractamount 201 to the movement instruction value which is supplied from thefirst host controller 41 as a movement instruction value.

When the process proceeds to step S104, the retract amount switchingunit 21 is switched to select the second retract amount 202. Since theretract amount switching unit 21 selects the second retract amount 202and the retract amount switch 23 is in the on state, the retract amountadding unit 24 outputs a value obtained by adding the second retractamount 202 to the movement instruction value which is supplied from thefirst host controller 41 as a movement instruction value.

Subsequently, in step S105, the position deviation generating unit 10,the position control unit 11, and the speed control unit 12 generateposition feedback information, a speed instruction value, and a currentinstruction value, respectively, by using the movement instruction valueto which the retract amount is added in the retract amount adding unit24. The current control unit 13 generates a drive instruction by usingthe current instruction value generated by the speed control unit 12.The amplifier 14 drives the motor 30 in response to the driveinstruction based on the movement instruction value generated by thecurrent control unit 13 to make the driver driven by the motor 30retract. When the driver driven by the motor 30 is processing and thefirst retract amount 201 is added by the retract amount adding unit 24,the motor 30 makes the driver retract only by a distance correspondingto the first retract amount 201. When the driver driven by the motor 30is not processing and the second retract amount 202 is added by theretract amount adding unit 24, the motor 30 makes the driver retractonly by a distance corresponding to the second retract amount 202.

When the driver driven by the motor 30 comes out from an abnormal statesuch as collision by making the driver retract, the motor currentinformation detected by the motor current detecting unit of the motor 30becomes smaller than the predetermined threshold. When the motor currentinformation becomes smaller than the predetermined threshold, theabnormal load detecting unit 22 determines that the load of the motor 30is normal and stops outputting the motor load abnormal information, andthe retract amount switch 23 is turned off. When the retract amountswitch 23 is turned off, the retract amount adding unit 24 outputs, as amovement instruction value, a movement instruction value supplied fromthe first host controller 41.

In the motor control system 101, when the current of the motor 30becomes larger than the predetermined threshold, occurrence of anabnormal state such as a collision in the driver driven by the motor 30is determined, and when the driver is retracted, whether the driver isbeing processing or not is determined. When it is determined that thedriver is processing, the motor control system 101 makes the driverretract only by the distance corresponding to the first retract amount201. When it is determined that the driver is not processing, the motorcontrol system 101 makes the driver retract only by the distancecorresponding to the second retract amount 202 which is different fromthe first retract amount. Since the motor control system 101 can set aretract amount suitable to each of the case that the driver isprocessing and the case where the driver is not processing, differentprotection objects such as a machine during the non-processing state anda workpiece during the processing state can be protected.

FIG. 3 is a block diagram illustrating a motor control system accordingto a second embodiment.

A motor control system 102 according to the second embodiment isdifferent from the motor control system 101 that an external device 50is disposed. The motor control system 102 is also different from themotor control system 101 that a second host controller 42 is disposed inplace of the first host controller 41.

The external device 50 generates a switch signal on the basis of thestatus and the like of devices other than the driver driven by the motor30 and outputs the generated switch signal to the retract amountswitching unit 21. The retract amount switching unit 21 selects eitherthe first retract amount 201 or the second retract amount 202 stored inthe retract amount storing unit 20 on the basis of the switching signalsupplied from the external device 50.

The second host controller 42 includes a movement instruction valuegenerating unit 420. Similar to the movement instruction valuegenerating unit 410, the movement instruction value generating unit 420generates a movement instruction value indicative of a movement amountof the position of the driver driven by the motor 30 and outputs thegenerated movement instruction value to the retract amount adding unit24. The second host controller 42 is different from the first hostcontroller 41 that it does not have a function of determining whetherthe driver driven by the motor 30 is processing or not and the modesignal is not output to the retract amount switching unit 21.

In the motor control system 102, the retract amount switching unit 21 isswitched by using the switch signal generated by the external device 50on the basis of the situation and the like of the device other than thedriver driven by the motor 30, so that the retract amount can beselected on the basis of wider conditions, and a machine tool can beprotected more reliably.

FIG. 4 is a block diagram illustrating a motor control system includinga motor control apparatus according to a third embodiment.

A motor control system 103 according to a third embodiment is differentfrom the motor control system 101 that a motor control apparatus 3 isdisposed in place of the motor control apparatus 1. The motor controlapparatus 103 is different from the motor control apparatus 101 that athird host controller 43 is disposed in place of the first hostcontroller 41.

The motor control apparatus 3 is different from the motor controlapparatus 1 that a retract amount storing unit 25 is disposed in placeof the retract amount storing unit 20.

The retract amount storing unit 25 is a storing device capable ofstoring a plurality of retract amounts, and includes a storage area inwhich a stored retract amount is rewritable by the third host controller43 during execution of a processing program, and a storage region inwhich a stored retract amount is not rewritable. The retract amountstoring unit 25 stores a first retract amount 251 as a retract amountused at the time of processing and a second retract amount 252 as aretract amount used at the time of non-processing. The first retractamount 251 is stored in a rewritable storage area in the retract amountstoring unit 25. The second retract amount 252 is stored in anon-rewritable storage area in the retract amount storing unit 25.

The third host controller 43 includes a movement instruction valuegenerating unit 430, a driver state determining unit 431, and a retractamount selecting unit 432. The movement instruction value generatingunit 430 has a function similar to that of the movement instructionvalue generating unit 410, and the driver state determining unit 431 hasa function similar to that of the driver state determining unit 411.

The retract amount selecting unit 432 includes, for example, a retractamount determination table 4321 specified for each processing programused by a retract amount used. When the processing program used ischanged, the retract amount selecting unit 432 selects a retract amountaccording to the changed processing program with reference to theretract amount determination table 4321 and writes the selected retractamount into the first retract amount 251. For example, when theprocessing program used is changed to a program A, a retract amount aspecified as a retract amount used for the program A is selected, andthe selected retract amount a is written in the first retract amount251. When the processing program used is changed to a program B, aretract amount b specified as a retract amount used for the program B isselected, and the selected retract amount b is written in the firstretract amount 251.

FIG. 5 is a flowchart illustrating a process flow of the retract amountselecting unit 432 in the motor control system 103.

First, in step S201, the retract amount selecting unit 432 determineswhether the processing program used is changed or not. When it isdetermined that the processing program used is changed, the processproceeds to step S202. When it is determined that the processing programused is not changed, the process proceeds to step S204.

When the process proceeds to step S202, the retract amount selectingunit 432 selects a retract amount corresponding to the changedprocessing program with reference to the retract amount determinationtable 4321.

In step S203, by writing the retract amount selected in step S202 to thefirst retract amount 251, the retract amount selecting unit 432 rewritesthe retract amount selected in step S202 with a retract amount accordingto the processing program used. Subsequently, the process returns tostep S201.

When the process proceeds to step S204, the retract amount selectingunit 432 determines whether the processing process is finished or not.When it is determined that the processing process is not finished, theprocess returns to step S201. The retract amount selecting unit 432repeats the process in steps S201 to S204 until it is determined in stepS204 that the processing process is finished. When it is determined thatthe processing process is finished, the flow is terminated.

In the motor control system 103, the retract amount is rewrittenaccording to a processing program used. Consequently, a retract amountaccording to the shape or the like of a workpiece to be processed can beselected, so that a workpiece being processed can be protected morereliably.

FIG. 6A is a diagram illustrating an example of a process of a machinetool to which the motor control system 103 is applied, and FIG. 6B is adiagram illustrating another example of the process of the machine toolto which the motor control system 103 is applied. More specifically,FIG. 6A is a diagram that the upper wall of a first recess 951 in aworkpiece 950 is cut, and FIG. 6B is a diagram that the upper wall of asecond recess 952 in the workpiece 950 is cut.

A machine tool 940 includes a cutter supporting unit 941 and a cutter942 disposed on the top face of the cutter supporting unit 941 to cutthe upper wall of the recess in the workpiece 950. Since the widths ofthe first recess 951 and that of the second recess 952 are differentfrom each other, the retract amount when the machine tool 940 makes thecutter 942 retract in a processing program for cutting the first recess951 and that in a processing program for cutting the second recess 952are different. In the processing program for cutting the first recess951, it is sufficient that the retract amount is shorter than a distanceA indicative of the difference between the width of the first recess 951and the height of the cutter supporting unit 941 and the cutter 942. Inthe processing program for cutting the second recess 952, it issufficient that the retract amount is shorter than a distance Bindicative of the difference between the width of the second recess 952and the height of the cutter supporting unit 941 and the cutter 942. Bysetting the retract amount at the time of using the processing programfor cutting the second recess 952 to be larger than the retract amountat the time of using the processing program for cutting the first recess951, the workpiece 950 can be protected more reliably.

FIG. 7 is a block diagram illustrating a motor control system includinga motor control apparatus according to a fourth embodiment.

A motor control system 104 according to a fourth embodiment is differentfrom the motor control system 103 that a fourth host controller 44 isdisposed in place of the third host controller 43.

The fourth host controller 44 includes a movement instruction valuegenerating unit 440, a driver state determining unit 441, a retractamount selecting unit 442, and a retract amount computing unit 443. Themovement instruction value generating unit 440, the driver statedetermining unit 441, and the retract amount selecting unit 442 havefunctions similar to those of the movement instruction value generatingunit 430, the driver state determining unit 431, and the retract amountselecting unit 432, respectively.

The retract amount computing unit 443 includes a movement speed table4431 specified for each processing program in which movement speedF[m/s] of the driver is used. When a process of a workpiece is started,the retract amount computing unit 443 computes a movement distance L[m]of the driver from the movement speed F[m/s] of the driver and time T[s]lapsed since the process of the workpiece is started. At the time ofcomputing the movement distance L[m] of the driver, the retract amountcomputing unit 443 refers to the movement speed table 4431. For example,when a processing program used is the program A, movement speed aspecified as the movement speed F[m/s] used for the program A isselected, and the selected movement speed a is computed as the movementspeed F[m/s] of the driver. When a processing program used is theprogram B, movement speed p specified as the movement speed F[m/s] usedfor the program B is selected, and the selected movement speed p iscomputed as the movement speed F[m/s] of the driver. Subsequently, theretract amount computing unit 443 compares the computed movementdistance L[m] with a retract amount selected from the retract amountdetermination table 4321. When the movement distance L[m] is smallerthan the retract amount selected from the retract amount determinationtable, the movement distance L[m] is set as a retract amount. When themovement distance L[m] is equal to or larger than the retract amountselected from the retract amount determination table, the retract amountselected from the retract amount determination table is written as thefirst retract amount 251.

FIG. 8 is a flowchart illustrating a process flow of the retract amountcomputing unit 443 in the motor control system 104.

First, in step S301, the retract amount computing unit 443 determineswhether a process is started or not. When it is determined that theprocess is not started, the process returns to step S301. When it isdetermined that the process is started, the program proceeds to stepS302.

When the process proceeds to step S302, the retract amount computingunit 443 computes movement distance L[m] from the movement speed F[m/s]of a workpiece and time T[s] lapsed since the process of the workpieceis started.

Subsequently, in step S303, the retract amount computing unit 443computes a present retract amount by adding the computed movementdistance L[m] to the retract amount selected from the retract amountdetermination table 4321.

In step S304, by writing the present retract amount computed in stepS303 as the first retract amount 251, the retract amount computing unit443 rewrites the shape or the like of the workpiece to be processed witha retract amount according to a present process state.

In step S305, the retract amount computing unit 443 determines whetherthe process is finished or not. When it is determined that the processis not finished, the process returns to step S302. The retract amountcomputing unit 443 repeats the process in steps S302 to S305 until it isdetermined in step S305 that the process is finished. When it isdetermined that the process is finished, the flow is terminated.

In the motor control system 104, the retract amount is computed andrewritten in accordance with a process state. Consequently, the retractamount according to a present process state such as the shape or thelike of a workpiece to be processed can be used, so that a workpiecebeing processed can be protected more reliably.

FIG. 9 is a diagram illustrating an example of a process of a machinetool to which the motor control system 104 is applied. Morespecifically, FIG. 9 is a diagram of cutting the bottom wall of thesecond recess 952 in the workpiece 950.

A machine tool 960 includes a cutter supporting unit 961 and a cutter962 disposed at the end of the cutter supporting unit 961 to cut thebottom wall of the recess in the workpiece 950. A jig 970 is disposedfor the purpose of fixing of a workpiece and the like. For a retract notcausing interference between the jig 970 and the cutter supporting unit961, a retractable range of the cutter supporting unit 961 is limited.In a process program for cutting the bottom wall of the second recess952, it is sufficient that a retract amount is shorter than a distanceC[m] indicative of the difference between a distance A[m] between thejig and the bottom wall of the second recess 952 and a distance B[m]indicative of the sum of the widths of the cutter supporting unit 961and the cutter 962. When the cutter 962 cuts while moving in a directionopposite to the jig 970 at the movement speed F[m/s], and when adistance C₀[m] indicates the difference between a distance A₀[m] betweenthe jig and the bottom wall of the second recess 952 at the start ofcutting and a distance B₀[m] indicative of the sum of the widths of thecutter supporting unit 961 and the cutter 962, it is sufficient that theretract amount after lapse of time T[s] since the start of the cuttingis smaller than a maximum retract amount Y indicated by Equation (2).

Y=C ₀ +F×T  Equation (2)

By setting a retract amount at the time of using the process program forcutting the bottom wall of the second recess 952 to a value according tothe maximum retract amount Y which increases according to a cuttingprocess, the retract amount can be increased as the cutting processprogresses. Consequently, the workpiece 950 can be protected morereliably.

FIG. 10 is a block diagram illustrating a motor control system includinga motor control apparatus according to a fifth embodiment.

A motor control system 105 according to the fifth embodiment isdifferent from the motor control system 103 that a fifth host controller45 is disposed in place of the third host controller 43.

The fifth host controller 45 includes a movement instruction valuegenerating unit 450, a driver state determining unit 451, and a retractamount determining unit 452. The movement instruction value generatingunit 450 and the driver state determining unit 451 have functionssimilar to those of the movement instruction value generating unit 430and the driver state determining unit 431, respectively.

The retract amount determining unit 452 includes a three-dimensionalmodel storing unit 4521 and a retract amount computing unit 4522. Thethree-dimensional model storing unit 4521 stores shape informationindicative of shapes of the driver driven by the motor 30, a workpiecedisposed in the driver driven by the motor 30, and an object close tothe driver driven by the motor 30 such as a jig for fixing a workpiece.The retract amount computing unit 4522 computes the distance between thedriver driven by the motor 30 and the object close to the driver drivenby the motor 30 from the shape information stored in thethree-dimensional model storing unit 4521, the rotational speed of themotor at present, and the like while referring to a program executed inthe fifth host controller 45. An example of a computing method of theretract amount computing unit 4522 is described in Japanese PatentPublication No. 5,030,628. The retract amount determining unit 452determines a retract amount by multiplying the computed distance with apredetermined safety ratio. The retract amount computing unit 4522writes the computed retract amount as the first retract amount 251. Inan example, the retract amount determining unit 452 determines a retractamount by using the shape information indicative of the shapes of thedriver driven by the motor 30 and the workpiece disposed in the driverdriven by the motor 30, the movement speed of the driver driven by themotor 30, and process time.

FIG. 11 is a flowchart illustrating a process flow of the retract amountdetermining unit 452 in the motor control system 105.

First, in step S401, the retract amount determining unit 452 determineswhether a process is started or not. When it is determined that theprocess is not started, the process returns to step S401. When it isdetermined that the process is started, the program proceeds to stepS402.

When the process proceeds to step S402, the retract amount determiningunit 452 computes the distance between the driver driven by the motor 30and the object close to the driver driven by the motor 30 from the shapeinformation stored in the three-dimensional model storing unit 4521, therotational speed of the motor at present, and the like while referringto a program executed in the fifth host controller 45.

Subsequently, in step S403, the retract amount determining unit 452determines a retract amount by multiplying the computed distance with apredetermined safety ratio.

In step S404, the retract amount determining unit 452 writes the retractamount at present determined in step S403 as the first retract amount251, thereby rewriting the retract amount to the retract amountaccording to the present process state.

In step S405, the retract amount determining unit 452 determines whetherthe process is finished or not. When it is determined that the processis not finished, the process returns to step S402. The retract amountdetermining unit 452 repeats the process in steps S402 to S405 until itis determined in step S405 that the process is finished. When it isdetermined that the process is finished, the flow is terminated.

In the motor control system 105, the retract amount is rewritten byusing the shape information stored in the three-dimensional modelstoring unit 4521, the rotational speed of the motor at present, and thelike. Consequently, the retract amount according to a present processstate can be used, so that a workpiece being processed can be protectedmore reliably.

In the motor control systems 101 to 105 according to the first to fifthembodiments, the retract amount selected when it is determined that theretract amount switching unit is processing and the retract amountselected when it is determined that the retract amount switching unit isnot processing are different from each other. In the motor controlsystems 101 to 105, since the retract amount selected during process andthat during non-process are made different, different protection objectscan be protected in such a manner that the tool is protected during noprocess and a workpiece is protected during process. Specifically, aretract amount for preventing interference with an object to beprocessed is applied during process, and a retract amount for reducingbreakage of the machine tool can be applied during no process.

In the motor control system 102 according to the second embodiment, theretract amount switching unit 21 is switched by using a switch signalgenerated by the external device 50 on the basis of the status and thelike of the devices other than the driver driven by the motor 30. In themotor control system 102, since the retract amount switching unit 21 isswitched by using a switch signal generated by the external device 50,the retract amount can be selected on the basis of conditions in a widerrange, and the machine tool can be protected more reliably.

The motor control system 103 according to the third embodiment has afunction of rewriting a retract amount used during process in accordancewith a process program used, so that a workpiece being processed can beprotected more reliably.

In the motor control system 104 according to the fourth embodiment, theretract amount is computed and rewritten in accordance with the processstate. Consequently, the retract amount according to a present processstate can be used, so that a workpiece being processed can be protectedmore reliably.

In the motor control system 105 according to the fifth embodiment, theretract amount is rewritten in accordance with the distance between thedriver driven by the motor 30 and the object close to the driver drivenby the motor 30 from the shape information stored in thethree-dimensional model storing unit 4521, the motor rotational speed atpresent, and the like while referring to a program executed in the fifthhost controller 45. Consequently, the retract amount according to apresent process state can be used, so that a workpiece being processedcan be protected more reliably.

The position deviation generating unit 10, the position control unit 11,the speed control unit 12, the current control unit 13, the retractamount switching unit 21, the abnormal load detecting unit 22, theretract amount switch 23, and the retract amount adding unit 24 may beconstructed in, for example, a software program form. The positiondeviation generating unit 10, the position control unit 11, the speedcontrol unit 12, the current control unit 13, the retract amountswitching unit 21, the abnormal load detecting unit 22, the retractamount switch 23, and the retract amount adding unit 24 may beconstructed by a combination of various electronic circuits and softwareprograms. For example, when constructing the position deviationgenerating unit 10, the position control unit 11, the speed control unit12, the current control unit 13, the retract amount switching unit 21,the abnormal load detecting unit 22, the retract amount switch 23, andthe retract amount adding unit 24 in a software program form, arithmeticprocessing apparatuses in the motor control apparatuses 1 and 3 operatein accordance with the software program, thereby realizing the functionsof the above-described units. An existing motor control apparatususually has the functions of the position deviation generating unit 10,the position control unit 11, the speed control unit 12, and the currentcontrol unit 13. The present invention can be also applied to theexisting motor control apparatus by installing software programscorresponding to the retract amount switching unit 21, the abnormal loaddetecting unit 22, the retract amount switch 23, and the retract amountadding unit 24 to the motor control apparatus.

In the motor control systems 101 to 105, whether the load of the motor30 is abnormal or not is determined in step S101 and, after that, theretract amount switching unit 21 switches the retract amount in stepsS102 to S104. However, in the motor control system according to thepresent invention, before whether the load of the motor 30 is abnormalor not is determined, the retract amount switching unit 21 may switchthe retract amount. The retract amount storing unit 20 may store threeor more retract amounts. When the retract amount storing unit 20 storesthree or more retract amounts, the retract amount switching unit 21 isformed to select any one retract amount from the three or more retractamounts. For example, the retract amount storing unit 20 may store aretract amount according to a process program used. Although theabnormal load detecting unit 22 detects an abnormal load by using motorcurrent information detected by the motor current detector, an abnormalload may be detected by using information indicative of the rotationalspeed of the motor 30 or information indicative of a rotation torque.

In the motor control system 104, the first retract amount 251 usedduring process is rewritten in accordance with the movement speed F[m/s]of the driver. Alternatively, the retract amount may be rewritten inaccordance with a process state of a workpiece by using anotherparameter. For example, the fourth host controller 44 prepares aparameter in advance, and a step of reading the prepared parameter as aretractment amount during a process program may be provided. During aprocess program, according to a plurality of processes executed on thebasis of the process program, a plurality of retractment amounts may beprepared for each of the processes. By having a retractment amountdetermined by executing a process simulation based on a process program,the fourth host controller 44 may rewrite a retractment amount inaccordance with the processing shape. The first retractment amount 251may be rewritten not by the fourth host controller 44 but from anotherapparatus.

The configuration of the above-described motor control apparatuses 101to 105 may perform switching by a setting of the high-order motor andthe motor control apparatus.

According to the present invention, the retract amount selected when itis determined that processing is being made and the retract amountselected when it is determined that processing is not being made aredifferent from each other. Consequently, different protection objectssuch as a machine during non-processing and a workpiece duringprocessing can be protected.

Since a retract amount to be selected is switched in accordance with aswitch signal input from an external device, a retract amount can beselected on the basis of conditions in a wider range, and a machine toolcan be protected more reliably.

Since a retract amount selected when it is determined that the machinetool is processing is rewritten in accordance with a process programused, a retract amount adapted to a processing program used can be set.

The retract amount selected when it is determined that the machine toolis processing is rewritten in accordance with a process state of aworkpiece which is processed by the machine tool, so that the retractamount adapted to the shape of a workpiece to be processed can be set.

What is claimed is:
 1. A motor control apparatus controlling a motordriving a machine tool, comprising: an abnormal load detecting unit thatdetects an abnormal load by monitoring a load of the motor; a retractamount storing unit that stores a plurality of retract amounts used whenthe machine tool performs a retract operation in response to detectionof an abnormal load by the abnormal load detecting unit; a retractamount switching unit that switches a retract amount selected from theplurality of retract amounts in accordance with a result ofdetermination of whether the machine tool is processing or not; and aretract amount adding unit that adds a retract amount selected byswitching of the retract amount switching unit to an instruction valueindicative of a movement amount of the machine tool, wherein a retractamount selected when it is determined that processing is being made anda retract amount selected when it is determined that processing is notbeing made are switched.
 2. The motor control apparatus according toclaim 1, wherein the retract amount switching unit switches a retractamount to be selected in accordance with a mode signal input from a hostcontroller.
 3. The motor control apparatus according to claim 1, whereinthe retract amount switching unit switches a retract amount to beselected in accordance with a switch signal input from an externaldevice.
 4. The motor control apparatus according to claim 1, wherein aretract amount selected when it is determined that the machine tool isprocessing is rewritten in accordance with a process program used. 5.The motor control apparatus according to claim 1, wherein a retractamount selected when it is determined that the machine tool isprocessing is rewritten in accordance with a process state of aworkpiece processed by the machine tool.